﻿$(function () {
    let id = $("#Id").val()
    $.ajax({
        url: '../../Brand/GetBrandExtension?brandId=' + id,
        contentType: 'application/json',
        success: function (e) {
            $("#BrandDetails").prop("innerHTML", e.brandDetails)
            $("#FranchiseAdvantages").prop("innerHTML", e.franchiseAdvantages)
            $("#FranchiseConditions").prop("innerHTML", e.franchiseConditions)
            $("#FranchiseProcess").prop("innerHTML", e.franchiseProcess)
        }
    })

    // 品牌轮播详情导航顶置不动  
    var nav = $(".detail-nav-ul");
    var nav_top = nav.offset().top;
    var nav_left = nav.offset().left;
    var nav_box = $(".des-middle-box-title");

    $(window).scroll(function () {
        if ($(window).scrollTop() > nav_top) {
            nav_box.css({
                "position": "fixed",
                "top": "0px",
                "left": "0px",
                "width": "1903px",
                "z-index": "999",
                "box-shadow": "#ddd 0px 1px 5px"
            });
            nav.css({
                "position": "fixed",
                "top": "0px",
                "width": "895px",

                "left": nav_left
            });
        }
        else {
            nav_box.css({
                "position": "static",
                "width": "100%",
                "margin": "0 auto",
                "box-shadow": "none"
            });
            nav.css({
                "position": "static",   //不浮动
                "width": "895px",
                "margin": "0 auto"
            });
        }
    });
})


